<!--
  @author duanzuocai
  @since 2018/10/23 15:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid">

  <div class="layui-card">

    <div class="layui-card-body">

      <!--表单样式统一为layui-form(必需样式)，lay-filter属性统一定义为zmn-form-->
      <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

        <input type="hidden" name="categId" th:value="${categ.categId}"/>
        <div class="layui-form-item">
          <label class="layui-form-label">分类名称：</label>
          <div class="layui-input-inline" style="width:300px;">
            <input type="text" lay-verify="required" name="name" th:value="${categ.name}" autocomplete="off" class="layui-input"/>
            <!--表单说明置于表单元素后方-->
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label layui-form-required">计价器名称：</label>
          <div class="layui-input-inline">
            <input type="text" name="tariffName" autocomplete="off" maxlength="20" class="layui-input" th:value="${categ.tariffName}"
                   lay-verify="required">
          </div>
        </div>
        <div class="layui-form-item" style="display: none">
          <label class="layui-form-label layui-form-required">计价器状态：</label>
          <div class="layui-input-block">
            <input name="tariffStatus" value="2">
          </div>
        </div>
        <div class="layui-form-item" style="display: none">
          <label class="layui-form-label">排序ID：</label>
          <div class="layui-input-inline" style="width:200px;">
            <input type="text" name="sort" th:value="${categ.sort}" autocomplete="off" class="layui-input"/>
          </div>
          <div class="layui-input-inline" style="width:160px;">
            <label class="layui-form-mid">数字越小，在越前面</label>
          </div>
        </div>
        <!--按钮栏
            置于form标签内的最下方，
            主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
            -->
        <div class="layui-form-item submit">
          <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
            <button onclick="parent.layui.element.tabDelete('layadmin-layout-tabs', window.location.pathname + window.location.search)" class="layui-btn layui-btn-primary" id="cancel">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">
  var json = {
    parentId: [[${parentId}]]
  };

  layui.config({
    base: "/static/lay/"
  }).extend({
    index: "lib/index",
    art_categ_detail: "categroy/zmn.art.categ.edit2",
  }).use(['index', 'art_categ_detail']);

</script>